<template>
    <div class="shop-address-add-action">
        <Button :style="themeBackround" :round="buttonRound" size="large" @click="addAddress">添加收货地址</Button>
    </div>
</template>

<script>
import { Button } from 'vant';
import ModeMixin from '@common/mixin';
import { mapActions } from 'vuex';
export default {
    name: 'AddAddressBtn', // 添加地址按钮
    mixins: [ModeMixin],
    components: {
        Button,
    },
    methods: {
        ...mapActions([
            'setEditAddressInfo',
        ]),
        addAddress() {
            this.setEditAddressInfo(null);
            this.$router.push('/shop/edit-address');
        },
    },
};
</script>

<style lang="less">
.shop-address-add-action {
    background-color: transparent;
    position: fixed;
    bottom: @shop-gap;
    padding-bottom: 0;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
    left: 0;
    right: 0;
    .p-h(@shop-gap-md);
}
</style>
